import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import router from './router'
import { createPinia } from 'pinia'

import * as ElementPlusIconsVue from '@element-plus/icons-vue'

import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'

// 创建根实例
const app = createApp(App)

const pinia = createPinia()
app.use(pinia)

app.use(ElementPlus)

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

//确保 _use_ 路由实例使
//整个应用支持路由。
app.use(router)

// 挂载根实例
app.mount('#app')
